package query.python;

import cn.edu.buaa.neo.codegraphql.dsl.lib.engine.QueryEngine;
import cn.edu.buaa.neo.codegraphql.language.python.lib.predicate.ContainsFunctionCall;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class SingleFunctionTest {
    @Test
    public void singleFunctionTest() throws ClassNotFoundException {
        // load the PythonQuery class
        Class.forName("cn.edu.buaa.neo.codegraphql.language.python.PythonQuery");

        QueryEngine.getInstance().execute("Single function", query -> query
                .from("open", new ContainsFunctionCall("open"))
                .select("open", "open() called")
        ).close();

        Assertions.assertTrue(true);
    }
}
